﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PropertyChanged;

namespace Kinlo.Model
{
    public class AfterWeightFirst : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public Guid ID { get; set; }
        [PrintExport(Description = "条码 ", Order = 1, Visibility = true)]
        public string Code { get; set; }

        [PrintExport(Description = "称号", Order = 2, Visibility = true)]
        public int? Index { get; set; }

        [PrintExport(Description = "托架号", Order = 2, Visibility = true)]
        public int? CodeIndex { get; set; }

        [PrintExport(Description = "站号 ", Order = 3, Visibility = true)]
        public int? TrayNum { get; set; }
        [PrintExport(Description = "列号 ", Order = 4, Visibility = true)]
        public int? TrayIndex { get; set; }
        [PrintExport(Description = "行号 ", Order = 5, Visibility = true)]       //
        public int? TrayCol { get; set; }

        [PrintExport(Description = "一注前重", Order = 6, Visibility = true)] 
        public double? OnceBeforWeight { get; set; }
        [PrintExport(Description = "一注后重", Order = 6, Visibility = true)]
        public double? OnceAfterWeight { get; set; }
        [PrintExport(Description = "化成损失量", Order = 6, Visibility = true)]
        public double? LossVal { get; set; } 

        [PrintExport(Description = "前重时间", Order = 6, Visibility = true)]
        public DateTime? BeforWeightTime { get; set; }
        [PrintExport(Description = "前重", Order = 6, Visibility = true)]
        public double? BeforWeight_One { get; set; }
        [PrintExport(Description = "后重", Order = 7, Visibility = true)]
        public double? AfterWeight_One { get; set; }
        [PrintExport(Description = "注液量", Order = 8, Visibility = true)]
        public double? InjectionNum_One { get; set; }
        [PrintExport(Description = "偏差值", Order = 9, Visibility = true)]
        public double? InjectionNum_Offset_One { get; set; }
        [PrintExport(Description = "是否补液", Order = 9, Visibility = true)]
        public string ISSuppled_One { get; set; }
        [PrintExport(Description = "补液量", Order = 9, Visibility = true)]
        public double? SupplementNum_One { get; set; }
        [PrintExport(Description = "补液后重量", Order = 9, Visibility = true)]
        public double? SupplementWeight_One { get; set; }
        [PrintExport(Description = "前称结果", Order = 10, Visibility = true)]
        public string BeforeResult_One { get; set; }
        [PrintExport(Description = "后称结果", Order = 10, Visibility = true)]
        public string AfterResult_One { get; set; }
        
        [PrintExport(Description = "结果", Order = 10, Visibility = true)]
        public string Result_One { get; set; }
        public string RangeOfInjection_One { get; set; }
        [PrintExport(Description = "生产日期", Order = 11, Visibility = true)]
        public DateTime? ProductDate { get; set; }
        [PrintExport(Description = "电解液料号", Order = 12, Visibility = true)]
        public string BatchNo { get; set; }
        [PrintExport(Description = "电解液批号", Order = 12, Visibility = true)]
        public string BatchNo1 { get; set; }
        public bool? IsValidate { get; set; }
        [PrintExport(Description = "设备编号", Order = 13, Visibility = true)]
        public string EquNo { get; set; }
        [PrintExport(Description = "员工编号", Order = 14, Visibility = true)]
        public string EmpNo { get; set; }
        [PrintExport(Description = "胶钉批次", Order = 14, Visibility = true)]
        public string JDBatchNo { get; set; }

        [PrintExport(Description = "保液量上限", Order = 15, Visibility = true)]
        public double InjValueUp { get; set; }

        [PrintExport(Description = "保液量下限", Order = 16, Visibility = true)]
        public double InjValueLow { get; set; }
        /// <summary>
        /// 循环次数
        /// </summary>
        /// 
        [PrintExport(Description = "循环次数", Order = 17, Visibility = true)]
        public double Loop { get; set; }
        /// <summary>
        /// 真空度设定值
        /// </summary>
        [PrintExport(Description = "真空度设定值", Order = 18, Visibility = true)]
        public double Vacuum { get; set; }
        /// <summary>
        /// 真空度实际值
        /// </summary>
        [PrintExport(Description = "真空度实际值", Order = 18, Visibility = true)]
        public double VacuumValue { get; set; }
        /// <summary>
        /// 正压
        /// </summary>
        [PrintExport(Description = "正压设定值", Order = 19, Visibility = true)]
        public double PPressure { get; set; }
        /// <summary>
        /// 正压实际值
        /// </summary>
        [PrintExport(Description = "正压实际值", Order = 19, Visibility = true)]
        public double PPressureValue { get; set; }
        /// <summary>
        /// 负压
        /// </summary>
        [PrintExport(Description = "负压设定值", Order = 20, Visibility = true)]
        public double NPressure { get; set; }
        /// <summary>
        /// 负压实际值
        /// </summary>
        [PrintExport(Description = "负压实际值", Order = 20, Visibility = true)]
        public double NPressureValue { get; set; }

        [PrintExport(Description = "保液量", Order = 6, Visibility = true)]
        public double? RetainVal { get; set; }

        [PrintExport(Description = "判断类型", Order = 22, Visibility = false)]
        public bool JudgeType { get; set; }
        [PrintExport(Description = "班次", Order = 22, Visibility = true)]
        public string ClassType { get; set; }
        public double? InjectionNum_One2
        {
            get {
                try
                {
                    return AfterWeight_One - BeforWeight_One ; 
                }
                catch { return 0; }
            }
        }

        /// <summary>
        /// 是否已上传
        /// </summary>
        public int? IsRead { get; set; }
        public DateTime? StartTime { get; set; } = new DateTime();

        [PrintExport(Description = "正压时间", Order = 22, Visibility = true)]
        /// <summary>
        /// 正压时间
        /// </summary>
        public int PTime { get; set; }

        [PrintExport(Description = "负压时间", Order = 22, Visibility = true)]
        /// <summary>
        /// 负压时间
        /// </summary>
        public int NTime { get; set; }

        [PrintExport(Description = "返工后称重", Order = 23, Visibility = true)]
        /// <summary>
        /// 返工后称重
        /// </summary>
        public double RWorkWeight { get; set; }

        [PrintExport(Description = "返工注液量", Order = 23, Visibility = true)]
        /// <summary>
        /// 返工注液量
        /// </summary>
        public double RWorkInjVal { get; set; }

        [PrintExport(Description = "返工保液量", Order = 23, Visibility = true)]
        /// <summary>
        /// 返工保液量
        /// </summary>
        public double RWorkHoldVal { get; set; }

        [PrintExport(Description = "返工时间", Order = 23, Visibility = true)]
        /// <summary>
        /// 返工时间
        /// </summary>
        public DateTime RWorkTime { get; set; }

        [PrintExport(Description = "返工员", Order = 23, Visibility = true)]
        /// <summary>
        /// 返工员
        /// </summary>
        public string RWorkOper { get; set; }

        [PrintExport(Description = "返工判定结果", Order = 23, Visibility = true)]
        /// <summary>
        /// 返工判定结果
        /// </summary>
        public int RWorkResult{ get; set; }

        [PrintExport(Description = "返工NG详情", Order = 23, Visibility = true)]
        /// <summary>
        /// 返工NG详情
        /// </summary>
        public string RWorkResultDetail { get; set; }



    }

}
